﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using XXVIII.Entity;

namespace XXVIII.Api.Models
{
    /// <summary>
    /// 通用查询体
    /// </summary>
    public class GeneralSearchRequest : DBPageBase
    {
        /// <summary>
        /// 表名 默认指向SYS_TABLE
        /// </summary>
        public string TableName { get; set; }

        /// <summary>
        /// 参数条件
        /// </summary>
        public List<TableAndOrLikeRequest> AndOrLikeList { get; set; }
    }

    /// <summary>
    /// 单个条件查询体
    /// </summary>
    public class TableAndOrLikeRequest
    {
        /// <summary>
        /// 列名
        /// </summary>
        public string ColumnName { get; set; }

        /// <summary>
        /// 列值   注:AndOrLikeType=6，7时 Value= DESC or ASC
        /// </summary>
        public string Value { get; set; }

        /// <summary>
        /// 列条件  注:1.and 2.or 3.like 4.like左 5.like右 6.orderby 
        /// </summary>
        public int AndOrLikeType { get; set; }
    }

    public class GeneralSignSearchRequest
    {
        /// <summary>
        /// 表名
        /// </summary>
        public string TableName { get; set; }

        /// <summary>
        /// 参数条件
        /// </summary>
        public List<TableAndOrLikeRequest> AndOrLikeList { get; set; }
    }


}